<%@ page pageEncoding="utf-8"%>
<%@ include file="/common/taglibs.jsp"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title><fmt:message key="flightAdjustInfoList.title"/></title> 
<script src="<c:url value='/scripts/common.js'/>"></script> 


<style type="text/css">
<!--
body {
	margin-left: 0px; 
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style>
<link rel="stylesheet" type="text/css" media="all"	href="<c:url value='/styles/layout.css'/>" />

<script src="<c:url value="/scripts/date.js"/>" language="javascript"></script>

</head>

<body leftmargin="0" topmargin="0">
<html:form action="adjustFlowMonitor.html?method=doMonitor" styleId="flightAdjustInfoForm">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr> 
    <td class="home-content-title"><img src="images/home_ico_listTitle.gif" width="22" height="20" align="absmiddle">不正常航班服务流程监控</td>
  </tr>
  
 <tr>
    <td height="30" class="home-search-space">
	 <table border="0" cellpadding="0" cellspacing="0">
	   <tr height="30" class="home-search-space">
		  <td width="9%" align=right>航班号：</td><td width="15%"><html:text property="flightNum" styleId="flightNum"  styleClass="home-table-inputbox" size="10"/></td>
      	  
		  <td width="12%" align=right>始发站：</td>
      	  <td width="20%">
			 <html:select name="flightAdjustInfoForm" property="departureAirport" size="1" styleId="vipTypeId" style="width:80px" >
			   <html:option  value="">&nbsp;</html:option> 
			   <html:options collection="cityInfo"  property="code" labelProperty="name"/> 
			 </html:select></td>
     	   <td width="12%" align=right>终点站：</td>
           <td width="20%">
			  <html:select name="flightAdjustInfoForm" property="arrivalAirport" size="1" styleId="vipTypeId" style="width:80px" >
			  	 <html:option  value="">&nbsp;</html:option> 
			  	 <html:options collection="cityInfo" property="code" labelProperty="name"/> 
			  </html:select></td>
		 <td align=right>&nbsp;<input type="button" class="home-inputBtn" name="Submit232" value="查询" onclick="javascript:adjustSearch();">
      	   <input name="Submit3" type="button" class="home-inputBtn" value="重置" onClick="doReset('flightNum','departureAirport','arrivalAirport','flightDate','startPublishTime','endPublishTime')"/>
      	   </td>
      	 </tr>
      	  <tr height="30" class="home-search-space">
      	  <td  align=right>航班日期：</td><td><html:text property="flightDate" styleId="flightDate" styleClass="home-table-inputbox"  size="10"/>
      	   <img src="images/date.gif" width="16" height="15" onclick="fPopCalendar(flightDate,flightDate);return false"/>
      	  </td>	  
           <td align=right>起始发布时间：</td><td><html:text property="startPublishTime" styleId="startPublishTime" styleClass="home-table-inputbox" style="width:125px" size="10"/>
      	   <img src="images/date.gif" width="16" height="15" onclick="fPopTimestamp(startPublishTime,startPublishTime);return false"/></td>
      	   <td align=right>结束发布时间：</td><td><html:text property="endPublishTime" styleId="endPublishTime" styleClass="home-table-inputbox" style="width:125px" size="10"/>
      	   <img src="images/date.gif" width="16" height="15" onclick="fPopTimestamp(endPublishTime,endPublishTime);return false"/></td>
      	   
      	   
		</tr>
	</table>
  </tr>

   <tr> 
    <td valign="top"> <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td class="home-table-topline"> </td>
        </tr>
        <tr> 
          <td class="home-table-leftline"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td class="home-table-tool-content02"><sasis:page items="${flightAdjustInfoList}"/></td>
              </tr>
         <tr> 
                <td align="center" valign="top" class="home-edittable-space">
     	
		<table width="100%" border="0" cellpadding="2" cellspacing="0" class="list_bordercolor">
                    <tr> 
                     <%-- <td width="6%" class="home-list-title"><div align="center"> 
                          <input type="checkbox" name="checkbox" value="checkbox" onclick="chooseAll(this)" />
                        </div></td>
                      <td  width="3%" class="home-list-title">&nbsp;ID</td> 
                      <td  width="6%" class="home-list-title">航班ID</td>--%>
                      <td  width="7%" class="home-list-title">&nbsp;航班号</td>
                      <td  width="9%" class="home-list-title">&nbsp;航班日期</td>
                      <td  width="14%" class="home-list-title">&nbsp;发布时间</td>
                      <td  width="7%" class="home-list-title">&nbsp;始发站</td>
                      <td  width="7%" class="home-list-title">&nbsp;终点站</td>
                      <td  width="12%" class="home-list-title">&nbsp;调前预飞时间</td>
                      <td  width="12%" class="home-list-title">&nbsp;调后预飞时间</td>
                      <td  width="14%" class="home-list-title">&nbsp;调整原因（外部）</td>
                      <td  width="10%" class="home-list-title">&nbsp;调整类型</td>
                      <td  width="10%" class="home-list-title">&nbsp;流程监控</td>
                    </tr>
                    <c:forEach var="results" items="${flightAdjustInfoList}" varStatus="status">
                    <tr>
                     <%--  <td class="home-list-content"><div align="center"> 
                        <input type="checkbox" name="selected_id" value="<c:out value='${results.id}'/>" />
                       </div> </td>
                     <td class="home-list-content">&nbsp;<c:out value="${results.id}"/></td> 
                      <td class="home-list-content"><c:out value="${results.flightInfoId}"/></td>--%>
                      <td class="home-list-content">&nbsp;<c:out value="${results.flightNum}"/></td>
                      <td class="home-list-content">&nbsp;<c:out value="${results.flightDate}"/></td>
                      <td class="home-list-content">&nbsp;<fmt:formatDate value="${results.publishTime}" pattern="yyyy-MM-dd HH:mm"/></td>
                      <td class="home-list-content">&nbsp;<c:out value="${results.dan}"/></td>
                      <td class="home-list-content">&nbsp;<c:out value="${results.aan}"/></td>
                      <td class="home-list-content">&nbsp;<fmt:formatDate value="${results.oldTime}" pattern="yyyy-MM-dd HH:mm"/></td>
                      <td class="home-list-content">&nbsp;<fmt:formatDate value="${results.currentTime}" pattern="yyyy-MM-dd HH:mm"/></td>
                      <td class="home-list-content">&nbsp;<c:out value="${results.reasonOutName}"/></td>
                      <td class="home-list-content">&nbsp;
                         <c:if test="${results.adjustType==1}">临时性调整</c:if>
                         <c:if test="${results.adjustType==2}">临时性取消</c:if>
                         <c:if test="${results.adjustType==3}">计划性调整</c:if>
                         <c:if test="${results.adjustType==4}">计划性取消</c:if>
                      </td>
                     <%--<td class="home-list-content">&nbsp;<c:out value="${results.protectInfo}"/></td>
                          <td class="home-list-content"><c:out value="${results.delayReason}"/></td> --%>
		    <td class="home-list-content" width="50">
		    	<img src="./images/view.gif" width="14" height="14" style="cursor:hand"  alt="流程监控"  onClick="window.location='./workflowmonitor.html?method=processInstance&model=abnormal&id=<c:out value="${results.procInstId}"/>'"/>&nbsp;
		    </td>
                    </tr>
		  </c:forEach> 
                  </table>
   
                </td>
              </tr>
            </table></td>
        </tr>
        <tr> 
          <td height="12"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td class="home-table-bottom-left">&nbsp;</td>
                <td class="home-table-bottom-bg">&nbsp;</td>
                <td class="home-table-bottom-right">&nbsp;</td>
              </tr>
            </table></td>
        </tr>
      </table></td>
  </tr>
  <tr> 
    <td height="10">&nbsp;</td>
  </tr>
</table>
</html:form>
<body leftmargin="t&gt;
" topmargin=" ad">-</body>

<script>
function adjustSearch(){
	//alert("come search!");
	//将需要验证的ID传入数组
	var propertyArray = new Array();
	propertyArray.push("flightNum");
	propertyArray.push("flightDate");
	propertyArray.push("startPublishTime");
	propertyArray.push("endPublishTime");
	//alert(propertyArray.length)
	//把验证数组传入验证特殊字符函数
	var result=checkSpecialInput(propertyArray);
	//alert("result="+result);
	if(result==true||result==null){
	     //alert(result);
	    flightAdjustInfoForm.submit();
	     
	}else{
	    alert(result);
	}
}
//function adjustSearch(){
//	//alert("come search!");
//	var flightNumTxt=document.getElementById("flightNum");
//	var nameTxt=document.getElementById("name");
	
//	var flightNumReg=false;
//	var nameReg=false;
	
	
//	var reg=/[%&',;=?$\x22+!~\\\/\{\}@]+/;
//	
//	if(flightNumTxt.value.length>0)flightNumReg=reg.test(flightNumTxt.value);
//	if(nameTxt.value.length>0)nameReg=reg.test(nameTxt.value);
	
	//alert("flightNumReg="+flightNumReg+";nameReg="+nameReg);
	
//	if(flightNumReg==false
//	   &&nameReg==false
//	   ){
	       //alert("可以查询");
//	    passengerServiceInfoForm.submit();
	     
//	   }else{
	    
//	    alert("查询条件不能包括特殊字符，请重新输入！");
//	   } */
//}
//written by kellen 07-04-19

function doDelete(chkName){  
		var selected = new Array(); 
		var val = "";	  
		   for (var i=0;i < document.forms[0].elements.length; i++){
				var e = document.forms[0].elements[i];  
				if (e.name==chkName){
					var chk = document.forms[0].elements[i];
					if(chk.checked){
						var bb = e.value; 
					    	selected.push(bb);
					    	break;
					} 
				}	 
			}	 
 		if(0!=selected.length){
 			if(confirm("<fmt:message key="common.confirm.message"/>")){  
				document.forms[0].method="post";
				document.forms[0].action="./flightAdjustInfo.html?method=delete";
				document.forms[0].submit();
			}else return;	  			
		}else{
			alert("<fmt:message key="common.delete.message"/>");
		}	 
	}
function doReset(t1,t2,t3,t4,t5,t6,t7){
		document.getElementById(t1).value="";
		document.getElementById(t2).value="";
		document.getElementById(t3).value="";
		document.getElementById(t4).value="";
		document.getElementById(t5).value="";
		document.getElementById(t6).value="";
		
	}	
</script>
<script src="<c:url value="/scripts/timestamp.js"/>" language="javascript"></script>
</html> 